﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using WF_TheTourManagement.EntityClass;

namespace WF_TheTourManagement.ControllerClass
{
    public class TourDetailsManagement
    {
        public int tourId;
        public string tourName;
        public int tourType;
        public List<int>[] locations;
        public List<int>[] prize;
        public DataTable allTours;
        public DataTable allLocations;
        public DataTable allTourTypes;

        public TourDetailsManagement()
        {

        }
        public TourDetailsManagement(int tourId, string tourName, int tourType, List<int>[] locations, List<int>[] prize)
        {
            this.tourId = tourId;
            this.tourName = tourName;
            this.tourType = tourType;
            this.locations = locations;
            this.prize = prize;

        }

        public TourDetailsManagement(TourDetailsManagement t)
        {
            this.tourId = t.tourId;
            this.tourName = t.tourName;
            this.tourType = t.tourType;
            this.locations = t.locations;
            this.prize = t.prize;
        }

        public void saveAll()
        {
            Tour _tour = new Tour(tourName);
            _tour.saveTour();
        }

        public void initAll()
        {
            initTour();
            initType();
            initTour();
            initLocationList();
        }

        void initType()
        {
            TourType _tt = new TourType();
            allTourTypes = _tt.allTourTypes();
        }

        void initTour()
        {
            Tour _t = new Tour();
            allTours = _t.allTours();
        }

        void initLocationList()
        {
            Location _l = new Location();
            allLocations = _l.allLocations();

        }



    }
}
